<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
        <link href="__PUBLIC__/css/hangye.css" rel="stylesheet" type="text/css" />
        <link href="__PUBLIC__/css/share.css" rel="stylesheet" type="text/css" />
        <link href="__PUBLIC__/css/comm.css" rel="stylesheet" type="text/css" />       
        <link href="__PUBLIC__/css/person.css" rel="stylesheet" type="text/css" />
        <link href="__PUBLIC__/css/panel.css" rel="stylesheet" type="text/css" />
        <link href="__PUBLIC__/js/auto/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>
        <script type="text/javascript" src="__PUBLIC__/js/auto/jquery.autocomplete.js"></script>
        <script type="text/javascript" src="__PUBLIC__/js/ckeditor/ckeditor.js"></script>
        <script src="__PUBLIC__/js/ajaxupload.js" type="text/javascript"></script>
        <title>{$share.caption}-补充分享</title>
    </head>
    <body>
	   <div class="containner">
        <include file="Index:header"/>
        <!--导航结束--> 
        <div id="myshare" style="position:absolute;top:0px;margin:auto;z-index:299"></div>
        <div class="body-center">
            <div class="path">
				首页 >> 个人信息 >> 补充分享
            </div>
            <div class="persion_title">{$share.caption}</div>
            <div class="contents">
                <div class="menu">
                    <include file="User:user_menu"/>
                </div>
                <form method="post" action="__APP__/Home/Share/shareAdded">
                    <div class="content">
                        <div id="addtextarea" class="addinput">
                            <div class="">{$share.caption} -- 补充分享</div>
                            <textarea name="content" id="content" rows="20" cols="92"></textarea>
                            <input type="hidden" value="{$id}" name="id">
                            <input id="upload_button" type="button" value="添加相关图片（限于png，gif，jpg，jpeg格式，大小限制3M" />
                            <input type="image" src="__PUBLIC__/images/submit.gif" align="right" id="submitadd" style="cursor:pointer;">
                        </div>
                    </div>
                </form>
            </div>
        </div>
      <include file="Index:bottom" />
      <!--页尾部分-->
	  </div>
    </body>
</html>
<script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/auto/jquery.autocomplete.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/ckeditor/ckeditor.js"></script>
<script src="__PUBLIC__/js/ajaxupload.js" type="text/javascript"></script>
<script>
    function checkForm(){        
        var content = $("#content").val();   
        content = DelHtml(content);
        if(content.length<10 || content.length > 500){
            alert('提问正文输入非法');
            return false;
        }
    }
   
    CKEDITOR.replace( 'content',{skin : 'kama'});
    
    $(document).ready(function(){
        var button = $('#upload_button'), interval;
        var fileType = "all",fileNum = "one";
        new AjaxUpload(button,{
            action: '__URL__/uploadPic',
            /*data:{
            'buttoninfo':button.text()
        },*/
            name: 'photo',
            onSubmit : function(file, ext){
            },
        onComplete: function(file, response){
            if(response != "success"){
               
                img = '<img id="user_pic" align=center src="__ROOT__/Public/Uploads/thumb_'+ response+"\" />";
                CKEDITOR.instances.content.insertHtml(img);      
                window.clearInterval(interval);              
            }
            if(response == "success"){
                alert('图片类型错误，请重试！');
            }
        }
    });
     });
</script>

